package com.azt.novel.book.controller;


import com.azt.novel.book.dto.resp.BookCommentRespDto;
import com.azt.novel.book.service.IBookCommentService;
import com.azt.novel.common.resp.RestResp;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 小说评论 前端控制器
 * </p>
 *
 * @author azt
 * @since 2023-12-02
 */
@RestController
@RequestMapping("/api/front/book")
public class BookCommentController {

    @Resource
    private IBookCommentService iBookCommentService;

    @Operation(summary = "小说最新评论查询接口")
    @GetMapping("/comment/newest_list")
    public RestResp<BookCommentRespDto> listNewestComments(@Parameter(description = "小说ID") Long bookId){
        return iBookCommentService.listNewestComments(bookId);
    }

}
